﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Small.Html.Options
{
   public class JqGridGroupHeader:JqBase
    {

       List<string> list = new List<string>();

        private string startColumnName;

        /// <summary>
        /// 开始列的名称
        /// </summary>
        public string StartColumnName
        {
            get { return startColumnName; }
            set { startColumnName = value;
            list.Add(IsStringNull("startColumnName", startColumnName));
            }
        }
        /// <summary>
        /// 跨多少列
        /// </summary>
        private int numberOfColumns;

        public int NumberOfColumns
        {
            get { return numberOfColumns; }
            set { numberOfColumns = value;
            list.Add(IsInteger("numberOfColumns", numberOfColumns));
            }
        }
        private string titleText;

        /// <summary>
        /// 列名
        /// </summary>
        public string TitleText
        {
            get { return titleText; }
            set { titleText = value;
            list.Add(IsStringNull("titleText", titleText));
            }
        }

        public override string GenerateString()
        {

            return "{ " + String.Join(",",list) +  OthertAtributes+"}";
        }
    }
}
